
package com.eyedog.video.search;

import com.eyedog.video.adv.AdvInstance;
import com.eyedog.video.entity.ADVEntity;
import com.eyedog.video.entity.CategoryEntity;
import com.eyedog.video.entity.HotTagEntity;
import com.eyedog.video.http.HttpClient;
import com.eyedog.video.http.HttpClientVideo;
import com.eyedog.video.http.ICallback;
import com.eyedog.video.maincategory.CategoryInstance;

import java.util.List;

public class SearchModel implements constract.ISearchModel {
    @Override
    public void loadSearchHeaderAdv(ICallback<ADVEntity> callback) {
        callback.onLoadSuccess(AdvInstance.getInstance().getSearchHeaderAdv());
    }

    @Override
    public void loadSearchCategorys(ICallback<List<CategoryEntity>> callback) {
        CategoryInstance.getInstance().loadCategories(callback);
    }

    @Override
    public void loadSearchTailAdv(ICallback<ADVEntity> callback) {
        callback.onLoadSuccess(AdvInstance.getInstance().getSearchTailAdv());
    }

    @Override
    public void loadHotTags(ICallback<List<HotTagEntity>> callback) {
        HttpClientVideo.getInstance().requestHotTagList(callback);
    }
}
